package com.simtop.service.impl;

import com.simtop.common.ServerResponse;
import com.simtop.dao.SwreadMapper;
import com.simtop.service.SwreadService;
import com.simtop.vo.Swread;
import com.simtop.vo.TypesState;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
@Service
@Transactional
public class SwreadServiceImpl implements SwreadService {
    @Autowired
    private SwreadMapper swreadMapper;
    @Override
    public List<Swread> findall(String tameName, String types, String readTimeBegins, String readTimeEnds,String column,String order,Integer id) {
        return swreadMapper.findall(tameName,types,readTimeBegins,readTimeEnds,column,order,id);
    }

    @Override
    public boolean deleteResources(Long[] id) {
        return swreadMapper.deleteResources(id);
    }

    @Override
    public TypesState selectTypes(Integer coach) {
        return swreadMapper.selectTypes(coach);
    }

    @Override
    public List<Swread> selectAll(Integer coach) {
        return swreadMapper.selectAll(coach);
    }

    @Override
    public List<Swread> selectAll2(ArrayList<Integer> selectidlist,Integer coach) {
        return swreadMapper.selectAll2(selectidlist,coach);
    }

    @Override
    public TypesState selectScore(Integer coach) {
        return swreadMapper.selectScore(coach);
    }

    @Override
    public List<Swread> findid(String tameName, String types, String readTimeBegins, String readTimeEnds, String column, String order, Integer userid) {
        return swreadMapper.findid(tameName,types,readTimeBegins,readTimeEnds,column,order,userid);
    }

    @Override
    public TypesState userTypes(Integer userid) {
        return swreadMapper.userTypes(userid);
    }

    @Override
    public TypesState userScore(Integer userid) {
        return swreadMapper.userScore(userid);
    }

    @Override
    public List<Swread> userAll(Integer userid) {
        return swreadMapper.userAll(userid);
    }

    @Override
    public List<Swread> userAll2( ArrayList<Integer> useridlist) {
        return swreadMapper.userAll2(useridlist);
    }
}
